package com.tarena.lbs.basic.web.config;

import com.tarena.lbs.common.passport.encoder.JwtEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class JwtEncoderConfig {
    //利用方法 初始化一个 JwtEncoder 返回给容器管理
    @Bean
    public JwtEncoder jwtEncoder() {
        JwtEncoder jwtEncoder = new JwtEncoder();
        //考虑生成jwt的encoder对象的盐和解析的盐必须一致
        jwtEncoder.setSecret("tarena2024Up;");
        return jwtEncoder;
    }
}
